package client;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

import javax.jmdns.JmDNS;
import javax.jmdns.ServiceInfo;

public class Test {
	private static ServiceManager m;
	public static void main(String[] args) throws IOException{
		m = new ServiceManager();
		m.getServices();
      	 JmDNS jmdns;
		try {
			jmdns = JmDNS.create();
			ServiceInfo info = ServiceInfo.create("MusicServer._udp.local.", "Sean", 1234, 0, 0,"Server_Type=Main_Server");
			jmdns.registerService(info);
			System.out.println("Registered Service as " + info);
		} catch (IOException e) {
			e.printStackTrace();
		}
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        String input = in.readLine();
		while (!input.equals("exit")){
			input = in.readLine();
		}

	}
}
